﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Profile.aspx.cs" Inherits="HiTeachers.Web.Profile" %>

<%@ Import Namespace="HiTeachers.Utilities" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphSearch" runat="server">
    <hiteacher:Search ID="htcSearch" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMainMenu" runat="server">
    <hiteacher:MainMenu ID="mnuMain" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">
    <form id="frmContacted" runat="server">
    <asp:ScriptManager ID="srcManager" runat="server" />
    <div id="divForm">
        <asp:MultiView ID="mtvProfile" runat="server">
            <asp:View ID="vMain" runat="server">
                <table width="550px">
                    <tr>
                        <td colspan="2" class="admToolbar" style="padding-left: 5px !important;">
                            <asp:Button ID="btnChangePassword" Text="Đổi mật khẩu" CssClass="btnClass prfButton"
                                ToolTip="Thay đổi mật khẩu của bạn." OnClick="BtnChangePasswordClick" runat="server" />&nbsp;
                            <!--------------------------------------------------------------------------------------->
                            <asp:Button ID="btnUpdateProfile" Text="Cập nhật hồ sơ" CssClass="btnClass prfButton"
                                ToolTip="Cập nhật hồ sơ của bạn." OnClick="BtnUpdateProfileClick" runat="server" />&nbsp;
                            <!--------------------------------------------------------------------------------------->
                            <asp:Button ID="btnFeedback" Text="Feedback" CssClass="btnClass prfButton" ToolTip="Các thông tin phản hồi từ học viên."
                                OnClick="BtnFeedbackClick" runat="server" />&nbsp;
                            <!--------------------------------------------------------------------------------------->
                            <asp:Button ID="btnUpdateAccount" Text="Nâng cấp tài khoản" CssClass="btnClass prfButton"
                                ToolTip="Nâng cấp tài khoản thành full account/gia hạn tài khoản" OnClick="BtnUpdateAccountClick"
                                runat="server" />
                        </td>
                    </tr>
                </table>
            </asp:View>
            <asp:View ID="vChangePassword" runat="server">
                <ul class="TabbedPanelsTabGroup">
                    <li class="TabbedPanelsTab TabbedPanelsTabSelected profileBar">Đổi mật khẩu</li>
                </ul>
                <asp:Label ID="lblChangePasswordMsg" CssClass="SuccMsg" Width="490px" runat="server"></asp:Label>
                <ul style="margin-top: 20px;">
                    <li class="profile">
                        <asp:RequiredFieldValidator ID="rfvOldPass" ControlToValidate="txtCurPassword" ValidationGroup="ChangePass"
                            ErrorMessage="Vui lòng nhập mật khẩu hiên tại của bạn!" Display="Dynamic" runat="server"></asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="rfvNewPass" ControlToValidate="txtNewPassword" ValidationGroup="ChangePass"
                            ErrorMessage="Vui lòng nhập mật khẩu mới!" Display="Dynamic" runat="server"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="cvPassword" ValidationGroup="ChangePass" ErrorMessage="Mật khẩu mới không chính xác. Vui lòng xác nhận lại!"
                            ControlToCompare="txtNewPassword" ControlToValidate="txtConfirmPassword" Display="Dynamic"
                            runat="server"></asp:CompareValidator>
                        <asp:RegularExpressionValidator ID="revPassword" ControlToValidate="txtNewPassword"
                            ValidationGroup="ChangePass" ErrorMessage="Mật khẩu mới không hợp lệ. Mật khẩu của bạn không được gắn hơn 8 ký tự!"
                            ValidationExpression="^[a-zA-Z0-9'@&#.\s]{8,40}$" Display="None" runat="server"></asp:RegularExpressionValidator>
                    </li>
                    <li class="profile">
                        <label for="lblStudentName">
                            Mật khẩu hiện tại</label>
                        <asp:TextBox ID="txtCurPassword" TextMode="Password" Width="300px" runat="server"></asp:TextBox>
                    </li>
                    <li class="profile">
                        <label for="lblRequestTitle">
                            Mật khẩu mới:</label>
                        <asp:TextBox ID="txtNewPassword" TextMode="Password" Width="300px" runat="server"></asp:TextBox>
                    </li>
                    <li class="profile">
                        <label for="txtTitle">
                            Nhập lại mật khẩu:</label>
                        <asp:TextBox ID="txtConfirmPassword" TextMode="Password" Width="300px" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label style="width: 250px;">
                        </label>
                        <asp:Button ID="btnPasswordChange" Text="Lưu" CssClass="btnClass" OnClick="BtnPasswordChangeClick"
                            ValidationGroup="ChangePass" runat="server" />&nbsp;&nbsp;
                        <asp:Button ID="btnCancel" Text="Hủy" OnClick="CancelClick" CssClass="btnClass" runat="server" />
                    </li>
                </ul>
            </asp:View>
            <asp:View ID="vDocument" runat="server">
                <ul class="TabbedPanelsTabGroup">
                    <li class="TabbedPanelsTab TabbedPanelsTabSelected profileBar">Cập nhật hồ sơ</li>
                </ul>
                <asp:Label ID="lblDocumentMsg" CssClass="SuccMsg" Width="490px" runat="server"></asp:Label>
                <ul style="margin-top: 20px;">
                    <li class="profile">
                        <label for="txtName">
                            Họ tên:</label>
                        <asp:TextBox ID="txtName" Width="300px" runat="server"></asp:TextBox>
                    </li>
                    <li class="profile">
                        <label for="txtAge">
                            Tuổi:</label>
                        <asp:TextBox ID="txtAge" Width="50px" runat="server"></asp:TextBox>&nbsp;
                        <asp:RegularExpressionValidator ID="revAge" ControlToValidate="txtAge" ValidationExpression="^\d+$"
                            ErrorMessage="Tuổi không hợp lệ!" ValidationGroup="Info" Display="Dynamic" runat="server"></asp:RegularExpressionValidator>
                    </li>
                    <li class="profile">
                        <label for="txtPhone">
                            Số điện thoại:</label>
                        <asp:TextBox ID="txtPhone" Width="300px" runat="server"></asp:TextBox>
                    </li>
                    <li class="profile">
                        <label for="txtTitle">
                            Hình ảnh:</label>
                        <hiteacher:ResizedImage ID="prfImage" ImageUrl="images/teacher_img.gif" MaxHeight="60"
                            MaxWidth="60" runat="server" />
                    </li>
                    <li class="profile">
                        <label>
                            &nbsp;</label>
                        <asp:FileUpload ID="fupFrfImage" size="34" runat="server" />
                    </li>
                    <li class="profile">
                        <label for="txtAddress">
                            Địa chỉ:</label>
                        <asp:TextBox ID="txtAddress" Width="300px" runat="server"></asp:TextBox>
                    </li>
                    <li class="profile">
                        <label for="txtDistrict">
                            Quận:</label>
                        <asp:TextBox ID="txtDistrict" Width="300px" runat="server"></asp:TextBox>
                    </li>
                    <li class="profile">
                        <label for="txtCity">
                            Thành phố:</label>
                        <asp:TextBox ID="txtCity" Width="300px" runat="server"></asp:TextBox>
                    </li>
                    <li class="profile">
                        <label for="chklSubject" style="float: left;">
                            Môn giảng dạy:</label>
                        <asp:CheckBoxList ID="chklSubject" CssClass="iptRadio" RepeatLayout="Table" RepeatColumns="3"
                            RepeatDirection="Horizontal" runat="server">
                        </asp:CheckBoxList>
                    </li>
                    <li class="profile">
                        <label for="txtTeachTimes">
                            Thời gian dạy:</label>
                        <asp:TextBox ID="txtTeachTimes" Width="300px" runat="server"></asp:TextBox>
                    </li>
                    <li class="profile">
                        <label for="txtFees">
                            Học phí/giờ(60'):</label>
                        <asp:TextBox ID="txtFees" Width="120px" runat="server"></asp:TextBox>&nbsp;VNĐ&nbsp;&nbsp;&nbsp;
                        <asp:CheckBox ID="chkNegotiate" CssClass="iptRadio iptChk" Text="Thỏa thuận" runat="server" />
                    </li>
                    <li class="profile">
                        <asp:CheckBox ID="chkReceiveNews" Text="Đăng ký nhận tin khi có tin đăng từ học viên"
                            CssClass="iptRecNews" TextAlign="Left" runat="server" />
                    </li>
                    <li class="profile">
                        <label for="txtIntro">
                            Giới thiệu sơ lược:
                        </label>
                        <br />
                        <asp:TextBox ID="txtIntroSumary" TextMode="MultiLine" runat="server"></asp:TextBox>
                    </li>
                    <li class="profile">
                        <label for="txtIntro">
                            Giới thiệu:
                        </label>
                        <br />
                        <CKEditor:CKEditorControl ID="txtIntro" Width="500px" ToolbarSet="MyToolbar" HtmlEncodeOutput="true"
                            runat="server"></CKEditor:CKEditorControl>
                    </li>
                    <li>
                        <label style="width: 250px;">
                        </label>
                        <asp:Button ID="btnSaveDoc" Text="Lưu" ValidationGroup="Info" CssClass="btnClass"
                            OnClick="BtnSaveDocClick" runat="server" />&nbsp;&nbsp;
                        <asp:Button ID="Button4" Text="Hủy" OnClick="CancelClick" CssClass="btnClass" runat="server" />
                    </li>
                </ul>
            </asp:View>
            <asp:View ID="vFeedback" runat="server">
                <ul class="TabbedPanelsTabGroup">
                    <li class="TabbedPanelsTab TabbedPanelsTabSelected profileBar">Phản hồi từ học viên
                        <a style="float: right; margin-right: 10px; color: White;" href="Profile.aspx">Trở về</a>
                    </li>
                </ul>
                <asp:Repeater ID="rptFeedback" runat="server">
                    <HeaderTemplate>
                        <div class="TabbedPanelsContentGroup">
                            <div>
                                <table border="0" cellpadding="5" cellspacing="0" class="feedbackdiv profilefeed">
                                    <tr valign="top">
                                        <td height="40" align="left">
                                            <div class="padbottom5">
                                                <span class="whiteboldtext">Học viên</span></div>
                                        </td>
                                        <td align="left">
                                            <div class="padbottom5">
                                                <span class="whiteboldtext">Đánh giá</span></div>
                                        </td>
                                        <td align="left">
                                            <div class="padbottom5">
                                                <span class="whiteboldtext">Nội dung</span></div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="5" colspan="3" align="left">
                                        </td>
                                    </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr valign="top">
                            <td valign="top" nowrap="nowrap" class="standardtextbold">
                                <span class="standardtext">Ngày </span>
                                <asp:Literal ID="ltrDate" Text='<%# Eval("InsertedDate","{0:dd/MM/yyyy}") %>' runat="server"></asp:Literal><br />
                                <asp:Literal ID="ltrFbName" Text='<%# Eval("Name") %>' runat="server"></asp:Literal><br />
                                <span class="standardtext">Nick: </span>
                                <asp:Literal ID="ltrFbEmail" Text='<%# Convert.ToString(Eval("Email")).Sub(8).Replace("@","xxx") %>'
                                    runat="server"></asp:Literal>
                            </td>
                            <td valign="top" nowrap="nowrap" class="standardtext">
                                <hiteacher:LiteralStar ID="ltrFbRate" NumberStar='<%# Eval("Rate") %>' runat="server"></hiteacher:LiteralStar>
                            </td>
                            <td colspan="2" align="left" valign="top" class="standardtext">
                                <div class="feedbackcommenttop">
                                </div>
                                <div class="feedbackcommentmiddle">
                                    <div class="feedbackcommentbox">
                                        <img src="images/leftcommentquote.png" alt="" />
                                        <asp:Literal ID="ltrFbContent" Text='<%# Eval("Content") %>' runat="server"></asp:Literal>
                                        <img src="images/rightcommentquote.png" alt="" width="15" height="12" /></div>
                                </div>
                                <div class="feedbackcommentbottom">
                                </div>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td colspan="4" style="height: 20px; padding-top: 5px;" valign="top" nowrap="nowrap"
                                class="standardtextbold">
                                <div class="feedbackdivider">
                                </div>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table> </div> </div>
                    </FooterTemplate>
                </asp:Repeater>
            </asp:View>
            <asp:View ID="vPayment" runat="server">
                <div id="content" style="min-height: 10px;">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td colspan="2" valign="top" nowrap="nowrap">
                                <div class="bottom10">
                                    <div class="solidlinedividerpublicmarketplace">
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" valign="top" nowrap="nowrap">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td valign="top" style="width: 90px;" nowrap="nowrap">
                                            <div class="imgTeacherdiv" align="center">
                                                <hiteacher:ResizedImage ID="teacherPic" MaxHeight="60" MaxWidth="60" runat="server" /></div>
                                        </td>
                                        <td valign="top">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td align="left" valign="top" nowrap="nowrap">
                                                        <span class="standardtextbold18px">
                                                            <asp:Literal ID="ltrName" Text="Nguyễn Bảo Vấn" runat="server"></asp:Literal></span>
                                                    </td>
                                                    <td align="left" valign="top">
                                                        <span class="standardtextbold14px">Dạy môn : <span class="blueboldtext18px">
                                                            <asp:Literal ID="ltrSubject" Text="Tiếng anh" runat="server"></asp:Literal></span></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" class="standardtextbold">
                                                        Địa chỉ
                                                    </td>
                                                    <td class="standardtext">
                                                        <asp:Literal ID="ltrAddress" Text="231 Đường số 8, P 11, Gò Vấp, Hồ Chí Minh." runat="server"></asp:Literal>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" class="standardtextbold">
                                                        Email
                                                    </td>
                                                    <td class="standardtext">
                                                        <asp:Literal ID="ltrEmail" Text="ngbvan2002@yahoo.com" runat="server"></asp:Literal>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td valign="top" class="standardtextbold">
                                                        Số điện thoại
                                                    </td>
                                                    <td class="standardtext">
                                                        <asp:Literal ID="ltrPhone" Text="0908 646 817" runat="server"></asp:Literal>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" valign="top" nowrap="nowrap">
                                <div class="padtop5">
                                    <div class="solidlinedividerpublicmarketplace">
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
                <ul class="TabbedPanelsTabGroup">
                    <li class="TabbedPanelsTab TabbedPanelsTabSelected profileBar">Gia hạn / Nâng cấp tài
                        khoản của bạn</li>
                </ul>
                <asp:UpdatePanel ID="udpUpdateAcount" UpdateMode="Conditional" runat="server">
                    <ContentTemplate>
                        <asp:Label ID="lblPaymentMsg" CssClass="SuccMsg" Text="text" Width="490px" runat="server"></asp:Label>
                        <ul style="margin-top: 20px;">
                            <li>
                                <label style="width: 200px;">
                                    Thời hạn thành viên chính thức:
                                </label>
                                <asp:DropDownList ID="ddlPeriod" OnSelectedIndexChanged="DdlPeriodSelectedIndexChanged"
                                    AutoPostBack="true" Width="145px" runat="server">
                                </asp:DropDownList>
                            </li>
                            <li>
                                <label style="width: 200px;">
                                    Mức phí thanh toán:</label>
                                <asp:TextBox ID="txtPaymentFees" ReadOnly="true" Style="text-align: right;" runat="server"></asp:TextBox>&nbsp;VNĐ
                            </li>
                            <li>
                                <label style="width: 200px;">
                                    Thời hạn thành viên chính thức:
                                </label>
                                <asp:Literal ID="ltrFullAccountPeriod" runat="server"></asp:Literal>
                            </li>
                            <li>
                                <label style="width: 250px;">
                                </label>
                                <asp:Button ID="btnUpgrade" Text="Nâng cấp" OnClick="BtnUpgradeClick" CssClass="btnClass"
                                    Style="vertical-align: top;" runat="server" />
                                <asp:ImageButton ID="ibtPayment" ImageUrl="https://www.nganluong.vn/data/images/buttons/12.gif"
                                    Style="height: auto;" runat="server" />&nbsp;&nbsp;
                                <asp:Button ID="btnUpdateAcountCancel" Text="Hủy" OnClick="CancelClick" CssClass="btnClass"
                                    Style="vertical-align: top;" runat="server" />
                            </li>
                        </ul>
                    </ContentTemplate>
                    <Triggers>
                        <asp:PostBackTrigger ControlID="btnUpdateAcountCancel" />
                    </Triggers>
                </asp:UpdatePanel>
            </asp:View>
        </asp:MultiView>
    </div>
    </form>
</asp:Content>
